<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="tutorial.css">
<TITLE>
Exercise
</TITLE>
</HEAD>
<BODY >
<A HREF="tutorial068.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="tutorial063.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc140">9.6</A>&nbsp;&nbsp;Exercise</H2>
<OL CLASS="enumerate" type=1><LI CLASS="li-enumerate"><BR>
<BR>
Consider the &#8220;farm&#8221; problem in section&nbsp;<A HREF="tutorial068.html#farm-example">9.5</A>. (Source code
may be found in <TT>farm.ecl</TT>, if you have access to it.) Try running
this program to find the answer. Note that other, larger solutions are
available by selecting <EM>more</EM>.<BR>
<BR>
This implementation sums three integer variables (<TT>FA</TT>, <TT>FB</TT>
and <TT>FC</TT>), and then constrains their order to remove symmetries.
Would this be a good candidate for the global constraint
<TT>ordered_sum/2</TT>? Modify the program so that it does use
<TT>ordered_sum/2</TT>. How does the run time compare with the original?</OL>
<A NAME="@default251"></A>
<HR>
<A HREF="tutorial068.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="tutorial063.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
</BODY>
</HTML>
